﻿using System;

namespace UniRx
{
	// Token: 0x0200039C RID: 924
	public static class OptimizedObservableExtensions
	{
		// Token: 0x060012AF RID: 4783 RVA: 0x00055F4C File Offset: 0x0005434C
		public static bool IsRequiredSubscribeOnCurrentThread<T>(this IObservable<T> source)
		{
			IOptimizedObservable<T> optimizedObservable = source as IOptimizedObservable<T>;
			return optimizedObservable == null || optimizedObservable.IsRequiredSubscribeOnCurrentThread();
		}

		// Token: 0x060012B0 RID: 4784 RVA: 0x00055F6E File Offset: 0x0005436E
		public static bool IsRequiredSubscribeOnCurrentThread<T>(this IObservable<T> source, IScheduler scheduler)
		{
			return scheduler == Scheduler.CurrentThread || source.IsRequiredSubscribeOnCurrentThread<T>();
		}
	}
}
